﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;

namespace HIWSystem.Common
{
    public class UserControlManage
    {
        static Dictionary<string, UserControl> dicUserControls = new Dictionary<string, UserControl>();
        public static void Register(string key, UserControl value)
        {
            if (!dicUserControls.ContainsKey(key))
            {
                dicUserControls.Add(key, value);
            }
        }
        public static UserControl Fetch(string key)
        {
            if (dicUserControls.ContainsKey(key))
            {
                return dicUserControls[key];
            }
            else
            {
                return null;
            }
        }
    }
}
